Mac OS 8.5 Technote: Part III

Copyright 1998 by Apple Computer, Inc. All Rights Reserved.

[Previous section] [Mac OS 8.5 Contents Page] [Next section]

Finder 8.5 (Continued)

Autorouting and Extended Routing

  • Finder now exclusively uses Folder Manager for auto-routing items dropped into the System Folder (see the Finder Interface Reference chapter of Inside Macintosh: Mac OS 8 Developer Documentation for more information).

  • Finder attempts to utilize extended routing information stored in the resource fork of a file if the file's extended routing info bit is set in its Finder flags. When such files are dropped into the System Folder, Finder will attempt to read a 'rout' (ID=0) resource, which should contain a list of routing information entries. Typically, there will be only one entry in the list. When the list contains more than one entry, Finder walks through each entry and uses the last one that matches.

    The 'rout' resource entries are defined as follows:

typedef struct
{
  OSType creator;           // set to zero
  OSType fileType;          // set to zero
  OSType targetFolder;      // set to 'macs'
  OSType destinationFolder; // the folder to route into 
  OSType reserved;          // set to zero
}
RoutingResourceEntry;

The creator, fileType, and reserved fields should be set to zero.

When the file is dropped into a folder of the type specified in targetFolder, it will be routed to the folder specified in destinationFolder. Currently, only the System Folder is supported for the targetFolder field, so this field should be set to the System Folder's FindFolder ID ('macs'). Example: if the file should be routed to the "Preferences" folder, the destinationFolder field should contain 'pref'.

Before the Finder will look for the 'rout' resource in a file, the routing information flag in the ioFlXFndrInfo.fdXFlags must be turned on. Developers can access this flag using the kExtendedFlagHasRoutingInfo mask defined in <Finder.h>.

COMPATIBILITY NOTE
Some of the fields documented in FInfo, DInfo, FXInfo, and DXInfo no longer accurately reflect how these fields are actually used by the system. Now, the accurate definition is provided by the FileInfo, FolderInfo, ExtendedFileInfo, and ExtendedFolderInfo data structures, respectively. In particular, they contain the definition of where to find the routing bit.

[Previous section] [Mac OS 8.5 Contents Page] [Next section]

To contact us, please use the Contact Us page.